/*
*
==============================================================================
*  Name        : 
*  Part of     : Omen Game Engine - Autodesk 3ds Studio .3ds file loader
*  Description : 
*  Version     : 1.0
*
*  Copyright (c) 2013 Lauri Kortevaara.
* 
==============================================================================
*/

#pragma once

///////////////////////////////////////////////////////////////////////////////////////////
//  The Model3DS file Chunk identifiers                                                  //
//                                                                                       //
//                                                                                       //
///////////////////////////////////////////////////////////////////////////////////////////
namespace Model3DS
{
const WORD ChunkHeaderSize = 0x0006; // 6 bytes of header data, 2-byte id + 4 byte length

//>------ Primary Chunk
const WORD MAIN3DS       = 0x4D4D;
const WORD VERSION3DS    = 0x0002;  // The version of this file
//>------ Main Chunks
const WORD EDIT3DS       = 0x3D3D;  // this is the start of the editor config
const WORD KEYF3DS       = 0xB000;  // this is the start of the keyframer config

//>------ sub defines of EDIT3DS
const WORD EDIT_MATERIAL = 0xAFFF;
const WORD EDIT_MATERIAL_NAME = 0xA000;                     // ASCII name
const WORD EDIT_MATERIAL_AMBIENT_COLOR = 0xA010;            // RGB1 and RGB2 
const WORD EDIT_MATERIAL_DIFFUSER_COLOR = 0xA020;           // idem
const WORD EDIT_MATERIAL_SPECULAR_COLOR = 0xA030;           // idem
const WORD EDIT_MATERIAL_SHININESS = 0xA040;                // amount of 
const WORD EDIT_MATERIAL_SHINE_STRENGTH = 0xA041;           // ""
const WORD EDIT_MATERIAL_TRANSPARENCY = 0xA050;             // ""
const WORD EDIT_MATERIAL_TRANSPARENCY_FALLOFF = 0xA052;     // ""
const WORD EDIT_MATERIAL_REFLECTION_BLUR = 0xA053;          // ""
const WORD EDIT_MATERIAL_TYPE = 0xA100;                     // 1=flat, 2=goraud, 3=phong, 4=metal
const WORD EDIT_MATERIAL_SELF_ILLUM = 0xA084;               // self illum      [amount of]
const WORD EDIT_MATERIAL_TRANSPARENCY_FALLOFF_A = 0xA240;   // some trans. falloff amount (not 0)
const WORD EDIT_MATERIAL_REFLECTION_BLUR_A = 0xA250;        // some reflect. blur
const WORD EDIT_MATERIAL_TWO_SIDED = 0xA081;                // two sided
const WORD EDIT_MATERIAL_TRANSPARENCY_ADD = 0xA083;         // transparency ADD
const WORD EDIT_MATERIAL_WIREFRAME_ON = 0xA085;             // wire on
const WORD EDIT_MATERIAL_FACE_MAP = 0xA088;                 // face map
const WORD EDIT_MATERIAL_TRANSPARENCY_FALLOFF_IN = 0xA08A;  // trans. falloff IN
const WORD EDIT_MATERIAL_SOFTEN = 0xA08C;                   // soften
const WORD EDIT_MATERIAL_WIREFRAME_THICKNESS_IN_UNITS = 0xA08e;//  3d wire thickness in units (default is in pix)
const WORD EDIT_MATERIAL_WIREFRAME_THICKNESS = 0xA087;      // float    wire thickness (always present, in case of forced wire rendering)
const WORD EDIT_MATERIAL_TEXTURE1 = 0xA200;                 // Texture map 1
const WORD EDIT_MATERIAL_TEXTURE_FILENAME = 0xA300;         // Texturemap filename
const WORD EDIT_MATERIAL_TEXTURE_MAP_TILING = 0xA351;       // Texturemap tiling 
const WORD EDIT_MATERIAL_TEXTURE_MAP_USCALE = 0xA354;       // Texturemap scale in u dir
const WORD EDIT_MATERIAL_TEXTURE_MAP_VSCALE = 0xA356;       // Texturemap scale in v dir
const WORD EDIT_MATERIAL_TEXTURE_MAP_UOFFSET = 0xA358;       // Texturemap offset in u dir
const WORD EDIT_MATERIAL_TEXTURE_MAP_VOFFSET = 0xA35A;       // Texturemap offset in v dir
const WORD EDIT_MATERIAL_TEXTURE_MAP_ROTATION = 0xA35C;       // Texturemap rotation angle
const WORD EDIT_CONFIG1  = 0x0100;                          // One unit
const WORD EDIT_CONFIG2  = 0x3E3D;
const WORD EDIT_VIEW_P1  = 0x7012;
const WORD EDIT_VIEW_P2  = 0x7011;
const WORD EDIT_VIEW_P3  = 0x7020;
const WORD EDIT_VIEW1    = 0x7001;
const WORD EDIT_BACKGR   = 0x1200;
const WORD EDIT_AMBIENT  = 0x2100;
const WORD EDIT_OBJECT   = 0x4000;
const WORD EDIT_MESH_VERSION = 0x3D3E;

const WORD EDIT_SHADOWMAP_BIAS  = 0x1400;
const WORD EDIT_SHADOWMAP_SIZE = 0x1420;
const WORD EDIT_SHADOWMAP_SAMPLE_RANGE = 0x1450;
const WORD EDIT_RAYTRACE_BIAS = 0x1460;

const WORD EDIT_O_CONSTS  = 0x1500;

const WORD EDIT_UNKNW01  = 0x1100;
const WORD EDIT_UNKNW02  = 0x1201;
const WORD EDIT_UNKNW03  = 0x1300;

const WORD EDIT_UNKNW08  = 0x2200;
const WORD EDIT_UNKNW09  = 0x2201;
const WORD EDIT_UNKNW10  = 0x2210;
const WORD EDIT_UNKNW11  = 0x2300;
const WORD EDIT_UNKNW12  = 0x2302;
const WORD EDIT_UNKNW13  = 0x3000;
const WORD EDIT_UNKNW14 = 0xAFFF;
         
//>------ sub defines of EDIT_OBJECT
const WORD OBJ_TRIMESH   = 0x4100;

const WORD OBJ_LIGHT     = 0x4600;
const WORD OBJ_CAMERA    = 0x4700;

const WORD OBJ_UNKNWN01  = 0x4010;
const WORD OBJ_UNKNWN02  = 0x4012; //>>---- Could be shadow

//>------ sub defines of OBJ_CAMERA
const WORD CAM_UNKNWN01  = 0x4710; 
const WORD CAM_UNKNWN02  = 0x4720;

//>------ sub defines of OBJ_LIGHT
const WORD LIT_OFF       = 0x4620;
const WORD LIT_SPOT      = 0x4610;
const WORD LIT_UNKNWN01  = 0x465A;

//>------ sub defines of OBJ_TRIMESH
const WORD TRI_VERTEXL   = 0x4110;
const WORD TRI_FACEL2    = 0x4111;
const WORD TRI_FACEL1    = 0x4120;
const WORD TRI_FACEMATL  = 0x4130;
const WORD TRI_MAPPING_COORD = 0x4140;
const WORD TRI_SMOOTH    = 0x4150;
const WORD TRI_LOCAL     = 0x4160;
const WORD TRI_VISIBLE   = 0x4165;

//>>------ sub defs of KEYF3DS

const WORD KEYF_UNKNWN01 = 0xB009;
const WORD KEYF_UNKNWN02 = 0xB00A;
const WORD KEYF_FRAMES   = 0xB008;
const WORD KEYF_OBJDES   = 0xB002;

//>>------  these define the different color Chunk types
const WORD COL_RGB  = 0x0010;
const WORD COL_TRU  = 0x0011;
const WORD COL_UNK  = 0x0013;

//>>------ defines for viewport chunks
const WORD TOP           = 0x0001;
const WORD BOTTOM        = 0x0002;
const WORD LEFT          = 0x0003;
const WORD RIGHT         = 0x0004;
const WORD FRONT         = 0x0005;
const WORD BACK          = 0x0006;
const WORD USER          = 0x0007;
const WORD CAMERA        = 0x0008;// = 0xFFFF is the actual code read from file
const WORD LIGHT         = 0x0009;
const WORD DISABLED      = 0x0010;
const WORD BOGUS         = 0x0011;


}

/// EOF